home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / newsgrp / group02b.txt / 000104_icon-group-sender_Thu Nov 7 16:44:19 2002.msg < prev    next >
Internet Message Format  |  2003-01-02  |  2KB

  1. Return-Path: <icon-group-sender>
  2. Received: (from root@localhost)
  3.     by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id gA7Ngh201603
  4.     for icon-group-addresses; Thu, 7 Nov 2002 16:42:43 -0700 (MST)
  5. Message-Id: <200211072342.gA7Ngh201603@baskerville.CS.Arizona.EDU>
  6. From: Art Eschenlauer <art.eschenlauer@sufsys.com>
  7. To: "'Ed L Cashin '" <ecashin@uga.edu>,
  8.    "'icon-group@CS.Arizona.EDU'"
  9.      <icon-group@cs.arizona.edu>
  10. Cc: "'websitewill@cox-internet.com'" <websitewill@cox-internet.com>
  11. Subject: RE: Question about Icon
  12. Date: Thu, 7 Nov 2002 16:55:16 -0600 
  13. Errors-To: icon-group-errors@cs.arizona.edu
  14. Status: RO
  15.  
  16. The easy way is to use Unicon 
  17.   <http://unicon.sourceforge.net> 
  18. because it provides the filepair() builting function.
  19. The POSIX extensions for Icon do the same - at least according to:
  20.   <http://www.drones.com/unicon/>
  21.  
  22. -----Original Message-----
  23. From: Ed L Cashin
  24. To: WebsiteWill
  25. Cc: icon-group@CS.Arizona.EDU
  26. Sent: 11/6/02 6:41 PM
  27. Subject: Re: Question about Icon
  28.  
  29. "WebsiteWill" <websitewill@cox-internet.com> writes:
  30.  
  31. > Is there a way to have an Icon Program take as input a Scheme
  32. > program as a basic string, do some conversions to that string and
  33. > then output the new string to a Scheme interpreter/compiler and run
  34. > it then finally take the output from Scheme as a new set of input
  35. > into the same Icon Program?
  36.  
  37. I was interested in your question, so I looked up info on pipes in
  38. icon, but it looks like there is no easy way to launch another process
  39. inside of icon and then do both writing to and reading from the another
  40. process.  
  41.  
  42. (Perl has to jump through hoops to support this -- see the perlipc
  43. manpage.) 
  44.  
  45. Please anyone chime in if there is an easy way to launch a process in
  46. icon code and then do I/O to and from the process.
  47.  
  48. You could, of course, manipulate the string, write it to a file on
  49. disk, run the scheme interpreter from icon with popen or open with the
  50. pipe mode (so that the scheme interpreter is reading from the file),
  51. and then read the output from the scheme interpreter through the
  52. pipe's filehandle.
  53.  
  54. -- 
  55. --Ed L Cashin            |   PGP public key:
  56.   ecashin@uga.edu        |   http://noserose.net/e/pgp/
  57.  
  58.